<!doctype html>
<html class="no-js fixed-layout" data-ng-app="audittest">
#include("/WEB-INF/tpl/head.vm")
<link rel="stylesheet" href="../assets/css/amazeui.tree.css" />
<div data-ng-controller="admin-adminauth">
    <div class="am-cf am-padding">
        <div class="am-fl am-cf">
            <strong class="am-text-primary am-text-lg">首页</strong> /
            <small>管理员授权设置</small>
        </div>
    </div>
    <div class="am-g">
        <div class="am-u-sm-3">
            <div>
                <div class="am-margin-right am-form">
                    <input type="text" data-ng-model="userfilter" placeholder="输入名称查找" />
                </div>
            </div>
            <ul class="am-tree" id="firstTree">
                <li class="am-tree-branch am-hide" data-template="treebranch">
                    <div class="am-tree-branch-header">
                        <button class="am-tree-branch-name">
                            <span class="am-tree-icon am-tree-icon-folder"></span>
                            <span class="am-tree-label"></span>
                        </button>
                    </div>
                    <ul class="am-tree-branch-children"></ul>
                    <div class="am-tree-loader">
                        <span class="am-icon-spin am-icon-spinner"></span>
                    </div>
                </li>
                <li class="am-tree-item am-hide" data-template="treeitem">
                    <button class="am-tree-item-name">
                        <span class="am-tree-icon am-tree-icon-item"></span>
                        <span class="am-tree-label"></span>
                    </button>
                </li>
            </ul>
        </div>

        <div class=" am-u-sm-6">
            <div class="am-scrollable-horizontal">
                <table class="am-table am-text-nowrap am-table-bd am-table-striped admin-content-table">
                    <thead>
                    <tr>
                        <th>
                            <input type="checkbox" data-ng-click="checkAll()" data-ng-model="checkall" />
                        </th>
                        <th>序号</th>
                        <th>登录名</th>
                        <th>姓名</th>
                        <th>机构</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr data-ng-repeat="item in persons | filter:userfilter track by $index">
                        <td>
                            <input type="checkbox" data-ng-model="item.checked" />
                        </td>
                        <td>{{$index + 1}}</td>
                        <td>{{item.username}}</td>
                        <td>{{item.realname}}</td>
                        <td>{{orgPathMaps[item.userdep]}}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <button type="button" class="am-btn am-btn-primary" data-ng-click="addperson()">添加</button>
        </div>

        <div tabindex="-1" id="doc-modal-1" class="am-u-sm-3 am-modal-no-btn">

            <div class="am-u-sm-12">

                <div class="am-scrollable-horizontal">
                    <table class="am-table am-text-nowrap am-table-bd am-table-striped admin-content-table">
                        <thead>
                        <tr>
                            <th></th>
                            <th>序号</th>
                            <th>登录名</th>
                            <th>姓名</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr data-ng-repeat="item in currentAuths | filter:userfilter track by $index">
                            <td>
                                <input type="checkbox" data-ng-model="item.checked" />
                            </td>
                            <td>{{$index + 1}}</td>
                            <td>{{item.username}}</td>
                            <td>{{item.realname}}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                <button type="button" class="am-btn am-btn-danger" data-ng-click="deleteperson()">删除</button>
                <div>&nbsp;</div>
                <hr />
                <div class="au-u-sm-12">
                    <button type="button" class="am-btn am-btn-primary" data-ng-click="postData()">保存</button>
                </div>
            </div>
        </div>
    </div>
</div>
    #include("/WEB-INF/tpl/footer.vm")
    <script src="../assets/js/amazeui.tree.js"></script>
</html>
